package com.java.enums.sample04;

public class FoodImp implements Food{

	@Override
	public void buyFood() {
		System.out.println("FoodImp.buyFood();");
	}
	public static void main(String[] args){
		Coffee cf = Coffee.BLACK_COFFEE;
		System.out.println(cf instanceof Food);//ture
		Food f01 = Coffee.BLACK_COFFEE;
		f01.buyFood();//Coffee.buyFood()
		Food f02 = new FoodImp();
		f02.buyFood();//FoodImp.buyFood();
		
		Coffee cf2 = Coffee.CAPPUCCINO;
		cf2.met();//CAPPUCCINO.met();
//		cf2.met2();无法调用
		cf2.buyFood();//Coffee.CAPPUCCINO.buyFood()
		cf.buyFood();//Coffee.buyFood()
	}
}
